<script setup>
import { onBeforeMount } from 'vue';
import emitter from '../libs/bus.js'
let x = ref('')
onBeforeMount(()=>{
    emitter.on('btn',(data)=>{
        x.value = data
    })
})
</script>

<template>
<div>
    <h1>b组件</h1>
    {{x}}
</div>
</template>

<style scope>

</style>
